home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE03 / CLINIC / LISTING4.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1995-07-28  |  248 b   |  9 lines

  1. var InstID: THandle;
  2. begin
  3.   InstID := WinEXec(CmdLine, CmdShow);
  4.   Result := InstID >= hInstance_Error;
  5.   if Result then
  6.     repeat
  7.       Application.ProcesssMessages;
  8.     until (GetModuleUsage(InstID) = 0) or Application.Terminated;
  9. end;